package com.zl.tby.model;

import com.zl.tby.core.base.bean.TbyBaseBean;
import lombok.Data;
import org.noear.wood.annotation.Table;

import java.math.BigDecimal;

/**
 * 概括数据管理
 * @author changpeng
 * @version 1.0
 * @since 2024/8/8 15:17
 */
@Data
@Table("tby_summarize_data")
public class TbySummarizeData extends TbyBaseBean {
    /**保护区总面积*/
    private BigDecimal reserveArea;
    /**核心区总面积*/
    private BigDecimal coreArea;
    /**缓冲区总面积*/
    private BigDecimal bufferArea;
    /**实验区总面积*/
    private BigDecimal experimentalArea;
    /**省份森林覆盖率*/
    private BigDecimal provinceForest;
    /**第一个城市的森林覆盖率*/
    private BigDecimal cityOneForest;
    /**第二个城市的森林覆盖率*/
    private BigDecimal cityTwoForest;
    /**保护区森林覆盖率*/
    private BigDecimal reserveForest;
    /**第一个主要保护物种*/
    private Long speciesOneId;
    /**物种面积*/
    private BigDecimal speciesOneArea;
    /**第二个主要保护物种*/
    private Long speciesTwoId;
    /**物种面积*/
    private BigDecimal speciesTwoArea;
    /**第三个主要保护物种*/
    private Long speciesThreeId;
    /**物种面积*/
    private BigDecimal speciesThreeArea;
    /**蕨类植物占全省比例*/
    private BigDecimal fernProvince;
    /**裸子植物占全省比例*/
    private BigDecimal gymnospermProvince;
    /**被子植物占全省比例*/
    private BigDecimal angiospermProvince;
    /**蕨类植物占保护区比例*/
    private BigDecimal fernReserve;
    /**裸子植物占保护区比例*/
    private BigDecimal gymnospermReserve;
    /**被子植物占保护区比例*/
    private BigDecimal angiospermReserve;
    /**鸟类占全省比例*/
    private BigDecimal birdsProvince;
    /**鸟类占保护区比例*/
    private BigDecimal birdsReserve;
    /**哺乳类占全省比例*/
    private BigDecimal mammalsProvince;
    /**哺乳类占保护区比例*/
    private BigDecimal mammalsReserve;
    /**两栖类占全省比例*/
    private BigDecimal amphibiansProvince;
    /**两栖类占保护区比例*/
    private BigDecimal amphibiansReserve;
    /**爬行类占全省比例*/
    private BigDecimal crawlersProvince;
    /**爬行类占保护区比例*/
    private BigDecimal crawlersReserve;
    /**昆虫类占全省比例*/
    private BigDecimal insectsProvince;
    /**昆虫类占保护区比例*/
    private BigDecimal insectsReserve;
    /**鱼类占全省比例*/
    private BigDecimal fishProvince;
    /**鱼类占保护区比例*/
    private BigDecimal fishReserve;
    /**总碳汇量*/
    private BigDecimal carbon;
    /**涵养水源*/
    private BigDecimal waterConservation;
    /**固土量*/
    private BigDecimal soilReinforcement;
    /**年滞尘量*/
    private BigDecimal keepDustDown;
    /**年保肥量*/
    private BigDecimal fertilizerPreservation;
    /**年吸收大气污染物*/
    private BigDecimal pollutant;

    public void updateArea(TbySummarizeData entity) {
        this.setBufferArea(entity.getBufferArea());
        this.setCoreArea(entity.getCoreArea());
        this.setReserveArea(entity.getReserveArea());
        this.setExperimentalArea(entity.getExperimentalArea());
    }

    public void updateForest(TbySummarizeData entity) {
        this.setProvinceForest(entity.getProvinceForest());
        this.setCityOneForest(entity.getCityOneForest());
        this.setCityTwoForest(entity.getCityTwoForest());
        this.setReserveForest(entity.getReserveForest());
    }

    public void updateSpecies(TbySummarizeData entity) {
        this.setSpeciesOneId(entity.getSpeciesOneId());
        this.setSpeciesOneArea(entity.getSpeciesOneArea());
        this.setSpeciesTwoId(entity.getSpeciesTwoId());
        this.setSpeciesTwoArea(entity.getSpeciesTwoArea());
        this.setSpeciesThreeId(entity.getSpeciesThreeId());
        this.setSpeciesThreeArea(entity.getSpeciesThreeArea());
    }

    public void updatePlant(TbySummarizeData entity) {
        this.setFernProvince(entity.getFernProvince());
        this.setGymnospermProvince(entity.getGymnospermProvince());
        this.setAngiospermProvince(entity.getAngiospermProvince());
        this.setFernReserve(entity.getFernReserve());
        this.setGymnospermReserve(entity.getGymnospermReserve());
        this.setAngiospermReserve(entity.getAngiospermReserve());
    }

    public void updateAnimal(TbySummarizeData entity) {
        this.setBirdsProvince(entity.getBirdsProvince());
        this.setBirdsReserve(entity.getBirdsReserve());
        this.setMammalsProvince(entity.getMammalsProvince());
        this.setMammalsReserve(entity.getMammalsReserve());
        this.setAmphibiansProvince(entity.getAmphibiansProvince());
        this.setAmphibiansReserve(entity.getAmphibiansReserve());
        this.setCrawlersProvince(entity.getCrawlersProvince());
        this.setCrawlersReserve(entity.getCrawlersReserve());
        this.setInsectsProvince(entity.getInsectsProvince());
        this.setInsectsReserve(entity.getInsectsReserve());
        this.setFishProvince(entity.getFishProvince());
        this.setFishReserve(entity.getFishReserve());
    }

    public void updateSystemService(TbySummarizeData entity) {
        this.setCarbon(entity.getCarbon());
        this.setWaterConservation(entity.getWaterConservation());
        this.setSoilReinforcement(entity.getSoilReinforcement());
        this.setKeepDustDown(entity.getKeepDustDown());
        this.setFertilizerPreservation(entity.getFertilizerPreservation());
        this.setPollutant(entity.getPollutant());
    }
}
